﻿using System.Data.Entity.ModelConfiguration;

namespace InvestmentIntelligence.DbModel.Models.Mapping
{
    public class TracePointMap: EntityTypeConfiguration<TracePoint>
    {
        public TracePointMap()
        {
            // Primary Key
            this.HasKey(t => new {t.InvestmentId, t.Date});
            
            // Table & Column Mappings
            this.ToTable("TracePoint", "Analytics");
            this.Property(t => t.InvestmentId).HasColumnName("InvestmentId");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Value).HasColumnName("Value");
        }
    }
}
